import { axios } from '@/utils/request'

// 模糊匹配组织下拉选项
export function autoCompleteOrgInfo(data, saas) {
  return axios({
    url: 'onlcode/saas/org/autoCompleteOrgInfo',
    method: 'get',
    params: data,
    headers: {
      saas
    }
  })
}

// 分页查询网点信息
export function queryByPage(data, params, saas) {
  return axios({
    url: 'onlcode/saas/org/queryByPage',
    method: 'post',
    params,
    data,
    headers: {
      saas
    }
  })
}

// 新增或修改网点信息
export function saveOrUpdate(data, saas) {
  return axios({
    url: 'onlcode/saas/org/saveOrUpdate',
    method: 'post',
    data,
    headers: {
      saas
    }
  })
}

// 开网
export function enableOrg(data, saas) {
  return axios({
    url: 'onlcode/saas/org/enableOrg',
    method: 'post',
    data,
    headers: {
      saas
    }
  })
}

// 退网
export function disableOrg(data, saas) {
  return axios({
    url: 'onlcode/saas/org/disableOrg',
    method: 'post',
    data,
    headers: {
      saas
    }
  })
}

// 根据id获取网点信息
export function getById(data, saas) {
  return axios({
    url: '/onlcode/saas/org/getById',
    method: 'get',
    params: data,
    headers: {
      saas
    }
  })
}

// 根据父级代码查询下级区域列表
export function queryDistrictList(data, saas) {
  return axios({
    url: '/onlcode/saas/district/queryDistrictList',
    method: 'get',
    params: data,
    headers: {
      saas
    }
  })
}


